home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1996 #6 / Amiga Plus CD - 1996 - No. 06.iso / pd / texte / texfontinst / contrib / pdc / pdcetxm.tex < prev    next >
Text File  |  1996-07-30  |  3KB  |  111 lines

  1. % pdcetxm.tex 1.1.1 1994/07/20 -- macros for ETX files
  2. % Copyright 1993, 1994 P. Damian Cugley
  3.  
  4. %%% @TeX-macro-file {
  5. %%%   filename       = "pdcetxm.tex",
  6. %%%   version        = "1.1.1",
  7. %%%   date           = "1994/07/20",
  8. %%%   package        = "Malvern 1.1",
  9. %%%   author         = "P. Damian Cugley",
  10. %%%   email          = "damian.cugley@comlab.ox.ac.uk",
  11. %%%   address        = "Oxford University Computing Laboratory,
  12. %%%                     Parks Road, Oxford  OX1 3QD, UK",
  13. %%%   codetable      = "USASCII",
  14. %%%   keywords       = "Malvern, METAFONT, font, typefont, TeX",
  15. %%%   supported      = "Maybe",
  16. %%%   abstract       = "Macros for Damian's ETX files.",
  17. %%%   dependencies   = "",
  18. %%% }
  19.  
  20. %  This software is available freely but without warranty.
  21. %  See the file COPYING for details.
  22.  
  23. %  Macro to enumerate numerals 0..9
  24. % #1 --  description
  25. %  of which set of numerals this will be -- such as "old style" or
  26. %  "ranging"
  27. % #2 -- the suffix to append to the letter to make its name 
  28. %  -- e.g., "oldstyle" to make "oneoldstyle", etc
  29. % #3  -- body of macro to typeset a sammple numberal
  30. %  it takes one argument, the character to be displayed
  31. %
  32. %  For eample, \pdcnumerals{ranging}{}{#1} or
  33. %  \pdcnumerals{old style}{oldstyle}{$\mit#1$}
  34.  
  35. % pdc 1993/10/21
  36.  
  37. \def\pdcnumerals#1#2%
  38. {
  39.     \edef\numeralentry##1##2%
  40.     {%
  41.     \noexpand\setslot{##1#2}
  42.     \noexpand\comment{The #1 digit
  43.         `\noexpand\numeralsample{##2}'.}
  44.     \noexpand\endsetslot
  45.     }
  46.     \afterassignment\xxxpdcnumerals
  47.     \def\numeralsample##1%
  48. }
  49.  
  50. \def\xxxpdcnumerals
  51. {
  52.     \numeralentry{zero}{0}
  53.     \numeralentry{one}{1}
  54.     \numeralentry{two}{2}
  55.     \numeralentry{three}{3}
  56.     \numeralentry{four}{4}
  57.     \numeralentry{five}{5}
  58.     \numeralentry{six}{6}
  59.     \numeralentry{seven}{7}
  60.     \numeralentry{eight}{8}
  61.     \numeralentry{nine}{9}
  62. }
  63.  
  64. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  65.  
  66. % Macro to enumerate alphabetics
  67.  
  68. % #1 --  a description of which alphabet this will be -- such as
  69. %   "lower case" or "capital"
  70. % #2 -- the suffix to append to the letter to make its name -- 
  71. %  e.g., "small" to make "Asmall", "Bsmall", etc.
  72. % #3 --  macro body to typeset a sample letter
  73. %  it takes one argument, the character to be displayed
  74. % For eample, \pdcuppercase{upper case}{}{\uppercase{#1}} or
  75. %  \pdclowercase{small capital}{small}{{\sc \lowercase{#1}}}
  76.  
  77. % pdc 1993/10/21
  78.  
  79. \newif\ifpdclowercase 
  80. \def\pdcuppercase{\pdclowercasefalse\pdcalphabet}
  81. \def\pdclowercase{\pdclowercasetrue\pdcalphabet}
  82.  
  83. \def\pdcalphabet#1#2%
  84. {
  85.     \edef\alphabetentry##1##2%
  86.     {%
  87.     \noexpand\setslot{\ifpdclowercase##2\else##1\fi#2}
  88.     \noexpand\comment{The #1 letter
  89.         `\noexpand\alphabetsample{##1}'.}
  90.     \noexpand\endsetslot
  91.     }
  92.     \afterassignment\xxxpdcalphabet
  93.     \def\alphabetsample##1%
  94. }
  95.  
  96. \def\xxxpdcalphabet
  97. {
  98.     \alphabetentry{A}{a} \alphabetentry{B}{b} \alphabetentry{C}{c}
  99.     \alphabetentry{D}{d} \alphabetentry{E}{e} \alphabetentry{F}{f}
  100.     \alphabetentry{G}{g} \alphabetentry{H}{h} \alphabetentry{I}{i}
  101.     \alphabetentry{J}{j} \alphabetentry{K}{k} \alphabetentry{L}{l}
  102.     \alphabetentry{M}{m} \alphabetentry{N}{n} \alphabetentry{O}{o}
  103.     \alphabetentry{P}{p} \alphabetentry{Q}{q} \alphabetentry{R}{r}
  104.     \alphabetentry{S}{s} \alphabetentry{T}{t} \alphabetentry{U}{u}
  105.     \alphabetentry{V}{v} \alphabetentry{W}{w} \alphabetentry{X}{x}
  106.     \alphabetentry{Y}{y} \alphabetentry{Z}{z}
  107. }
  108.  
  109.  
  110. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  111.